#!/bin/bash

SN=$1
PACKAGE_NAME='com.shark.rebirth'

for i in {1..100}
do
echo "kill process $i times"
echo $(adb -s $SN shell ps | grep "$PACKAGE_NAME")
adb -s $SN shell am force-stop $PACKAGE_NAME
sleep 1
done

sleep 1
echo $(adb -s $SN shell ps | grep "$PACKAGE_NAME")